#-------------------------------------------------
#
# Project created by QtCreator 2011-04-14T12:54:45
#
#-------------------------------------------------

# Define current version
MAX_VERSION = 1
MIN_VERSION = 0
SUB_VERSION = 0
VERSION += $${MAX_VERSION}.$${MIN_VERSION}.$${SUB_VERSION}


# Specific defines affecting the app:
# CAP_NO_ADS: removes the use of adds (supporters CAN have ads if they want)
# CAP_SCREEN_ON: enable the always on screen feature
# CAP_SUPPORTER: enable extra texts and goodies for supporters

DEFINES += VERSION=\"\\\"$${VERSION}\\\"\" ANDROID

##### OVI STORE FREE VERSION #####
#EXTRA_MOBILITY =
#EXTRA_CAPABILITY = SwEvent
#EXTRA_NAME =
#TRACKAWAY_UID3 = 0x20040CC8

##### OVI STORE SUPPORT VERSION #####
#EXTRA_MOBILITY = systeminfo
#EXTRA_CAPABILITY = ReadDeviceData SwEvent
#TRACKAWAY_UID3 = 0x20040CC9
#EXTRA_NAME = Supporter
#DEFINES += CAP_SCREEN_ON CAP_SUPPORTER CAP_NO_ADS

##### WEB SITE SUPPORTER VERSION #####
#EXTRA_MOBILITY =
#EXTRA_CAPABILITY =
#TRACKAWAY_UID3 = 0xeaf8b1ef
#EXTRA_NAME = Supporter
#DEFINES += CAP_SUPPORTER CAP_NO_ADS

##### WEB SITE AND TESTING DEPLOYMENT SECTION #####
EXTRA_MOBILITY =
EXTRA_CAPABILITY =
TRACKAWAY_UID3 = 0xeaf8b1df
EXTRA_NAME = Free
DEFINES +=

# Add translations:
TRANSLATIONS = translations/trackaway_it.ts \
               translations/trackaway_de.ts \
               translations/trackaway_fr.ts \
               translations/trackaway_zh.ts \
               translations/trackaway_nl.ts \
               translations/trackaway_es.ts \
               translations/trackaway_eu.ts \
               translations/trackaway_fi.ts \
               translations/trackaway_ro.ts
DEFINES += FT_LANGS=\"\\\"en-it-de-fr-zh-nl-es-eu-fi-ro\\\"\"

QT       += core gui network webkit xml

TARGET = TrackAWay$${EXTRA_NAME}
TEMPLATE = app

SOURCES += main.cpp\
        trackaway.cpp \
    tracktable.cpp \
    tracksmanagerlabel.cpp \
    tracksmanager.cpp \
    statusbar.cpp \
    oauthmanager.cpp \
    modifiable.cpp \
    livetrack.cpp \
    gpsmanager.cpp \
    gps_waypoint.cpp \
    gps_track.cpp \
    gps_point.cpp \
    gps_leg.cpp \
    gps_dop.cpp \
    dialogconfig.cpp \
    dialogabout.cpp \
    configuration.cpp \
    configfile.cpp \
    controls/rotatingwidget.cpp \
    controls/rotatingdialog.cpp \
    controls/ftwidgetlistitem.cpp \
    controls/ftwidgetlist.cpp \
    controls/fttabwidget.cpp \
    controls/ftshowtext.cpp \
    controls/ftsatellitemap.cpp \
    controls/ftradiobutton.cpp \
    controls/ftpushbutton.cpp \
    controls/ftmessagebox.cpp \
    controls/ftlist.cpp \
    controls/ftlabel.cpp \
    controls/fticonlabel.cpp \
    controls/ftcompass.cpp \
    controls/ftcheckbox.cpp \
    controls/filebrowser.cpp \
    libjpeg/jutils.c \
    libjpeg/jquant2.c \
    libjpeg/jquant1.c \
    libjpeg/jmemnobs.c \
    libjpeg/jmemmgr.c \
    libjpeg/jidctred.c \
    libjpeg/jidctint.c \
    libjpeg/jidctfst.c \
    libjpeg/jidctflt.c \
    libjpeg/jfdctfst.c \
    libjpeg/jfdctflt.c \
    libjpeg/jerror.c \
    libjpeg/jdtrans.c \
    libjpeg/jdsample.c \
    libjpeg/jdpostct.c \
    libjpeg/jdphuff.c \
    libjpeg/jdmerge.c \
    libjpeg/jdmaster.c \
    libjpeg/jdmarker.c \
    libjpeg/jdmainct.c \
    libjpeg/jdinput.c \
    libjpeg/jdhuff.c \
    libjpeg/jddctmgr.c \
    libjpeg/jdcolor.c \
    libjpeg/jdcoefct.c \
    libjpeg/jdatasrc.c \
    libjpeg/jdatadst.c \
    libjpeg/jdapistd.c \
    libjpeg/jdapimin.c \
    libjpeg/jctrans.c \
    libjpeg/jcsample.c \
    libjpeg/jcprepct.c \
    libjpeg/jcphuff.c \
    libjpeg/jcparam.c \
    libjpeg/jcomapi.c \
    libjpeg/jcmaster.c \
    libjpeg/jcmarker.c \
    libjpeg/jcmainct.c \
    libjpeg/jcinit.c \
    libjpeg/jchuff.c \
    libjpeg/jcdctmgr.c \
    libjpeg/jccolor.c \
    libjpeg/jccoefct.c \
    libjpeg/jcapistd.c \
    libjpeg/jcapimin.c \
    ll-utm/LatLong-UTMconversion.cpp \
    controls/ftpushbuttonicon.cpp \
    image/imagepng.cpp \
    image/imagejpeg.cpp \
    image/image.cpp \
    mapsmanager.cpp \
    systemcontrols.cpp \
    workers/workersavegpx.cpp \
    workers/workerprocess.cpp \
    workers/workerprecachemap.cpp \
    workers/workerloadgpx.cpp \
    workers/workerclearcache.cpp \
    workers/workerautosave.cpp \
    workers/workerautoload.cpp \
    livetrackautosaver.cpp \
    ftpainter.cpp \
    controls/ftlatlonedit.cpp \
    controls/ftmultibutton.cpp \
    controls/ftcombobox.cpp \
    map.cpp \
    mapchunk.cpp \
    mapcalibrator.cpp \
    controls/ftlineedit.cpp \
    controls/ftcontrols.cpp \
    controls/ftslidebutton.cpp \
    controls/latlondialog.cpp \
    controls/ftvboxlayout.cpp \
    controls/fthboxlayout.cpp \
    statstracks.cpp \
    breadcrumbssync.cpp \
    controls/ftgraph.cpp \
    controls/ftcomboboxdialog.cpp \
    controls/ftbrowser.cpp \
    controls/ftcolordialog.cpp \
    controls/flickcharm.cpp \
    controls/fttextarea.cpp \
    controls/ftbasicwidget.cpp \

HEADERS  += trackaway.h \
    tracktable.h \
    tracksmanagerlabel.h \
    tracksmanager.h \
    statusbar.h \
    oauthmanager.h \
    modifiable.h \
    livetrack.h \
    gpsmanager.h \
    gps_waypoint.h \
    gps_track.h \
    gps_point.h \
    gps_leg.h \
    gps_dop.h \
    dialogconfig.h \
    dialogabout.h \
    defines.h \
    configuration.h \
    configfile.h \
    controls/rotatingwidget.h \
    controls/rotatingdialog.h \
    controls/ftwidgetlistitem.h \
    controls/ftwidgetlist.h \
    controls/fttabwidget.h \
    controls/ftshowtext.h \
    controls/ftsatellitemap.h \
    controls/ftradiobutton.h \
    controls/ftmessagebox.h \
    controls/ftlist.h \
    controls/ftlabel.h \
    controls/fticonlabel.h \
    controls/ftcompass.h \
    controls/ftcheckbox.h \
    controls/filebrowser.h \
    libjpeg/jversion.h \
    libjpeg/jpeglib.h \
    libjpeg/jpegint.h \
    libjpeg/jmorecfg.h \
    libjpeg/jmemsys.h \
    libjpeg/jinclude.h \
    libjpeg/jerror.h \
    libjpeg/jdhuff.h \
    libjpeg/jdct.h \
    libjpeg/jconfig.h \
    libjpeg/jchuff.h \
    libpng/pngstruct.h \
    libpng/pngpriv.h \
    libpng/pnglibconf.h \
    libpng/pnginfo.h \
    libpng/pngdebug.h \
    libpng/pngconf.h \
    libpng/png.h \
    ll-utm/LatLong-UTMconversion.h \
    ll-utm/constants.h \
    controls/ftcontrols.h \
    controls/ftpushbutton.h \
    controls/ftpushbuttonicon.h \
    image/imagejpeg.h \
    image/image.h \
    image/imagepng.h \
    mapsmanager.h \
    systemcontrols.h \
    workers/workersavegpx.h \
    workers/workerprocess.h \
    workers/workerprecachemap.h \
    workers/workerloadgpx.h \
    workers/workerclearcache.h \
    workers/workerautosave.h \
    workers/workerautoload.h \
    livetrackautosaver.h \
    ftpainter.h \
    controls/ftlatlonedit.h \
    controls/ftmultibutton.h \
    controls/ftcombobox.h \
    map.h \
    mapchunk.h \
    mapcalibrator.h \
    controls/ftlineedit.h \
    controls/ftslidebutton.h \
    controls/latlondialog.h \
    controls/ftvboxlayout.h \
    controls/fthboxlayout.h \
    statstracks.h \
    breadcrumbssync.h \
    controls/ftgraph.h \
    controls/ftcomboboxdialog.h \
    controls/ftbrowser.h \
    controls/ftcolordialog.h \
    controls/flickcharm.h \
    controls/fttextarea.h \
    controls/ftbasicwidget.h

win32 {

    # Specific sources for LIBPNG, which are missing in simulator and win32
    SOURCES +=     libpng/pngrio.c \
                    libpng/pngread.c \
                    libpng/pngpread.c \
                    libpng/pngmem.c \
                    libpng/pngget.c \
                    libpng/pngerror.c \
                    libpng/png.c \
                    libpng/pngwutil.c \
                    libpng/pngwtran.c \
                    libpng/pngwrite.c \
                    libpng/pngwio.c \
                    libpng/pngtrans.c \
                    libpng/pngset.c \
                    libpng/pngrutil.c \
                    libpng/pngrtran.c

    CONFIG(debug, debug|release) {
        LIBS += -L../trackaway/simulator/debug
    }
    else {
        LIBS += -L../trackaway/simulator/release
    }
}

# Enable mobility libraries
CONFIG += mobility
MOBILITY = location network sensors systeminfo $${EXTRA_MOBILITY}

RESOURCES += \
    trackaway.qrc \
    translations/translations.qrc

OTHER_FILES += \
    statusbar_png/gps_nofix.png \
    statusbar_png/gps_fix.png \
    statusbar_png/gps_disabled.png \
    qtc_packaging/debian_harmattan/rules \
    qtc_packaging/debian_harmattan/README \
    qtc_packaging/debian_harmattan/copyright \
    qtc_packaging/debian_harmattan/control \
    qtc_packaging/debian_harmattan/compat \
    qtc_packaging/debian_harmattan/changelog \
    qtc_packaging/debian_fremantle/rules \
    qtc_packaging/debian_fremantle/README \
    qtc_packaging/debian_fremantle/copyright \
    qtc_packaging/debian_fremantle/control \
    qtc_packaging/debian_fremantle/compat \
    qtc_packaging/debian_fremantle/changelog

# Symbian specific section
symbian {

    # Specific sources for LIBPNG, which are missing in Symbian
    SOURCES +=     libpng/pngrio.c \
                    libpng/pngread.c \
                    libpng/pngpread.c \
                    libpng/pngmem.c \
                    libpng/pngget.c \
                    libpng/pngerror.c \
                    libpng/png.c \
                    libpng/pngwutil.c \
                    libpng/pngwtran.c \
                    libpng/pngwrite.c \
                    libpng/pngwio.c \
                    libpng/pngtrans.c \
                    libpng/pngset.c \
                    libpng/pngrutil.c \
                    libpng/pngrtran.c

    vendorinfo = \
                ";The localised vendor name (a comma separated group of names in each language supported by the package)" \
                "%{\"Willy Gardiol\"}" \
                ";The global vendor name (used to identify the package for package upgrades)" \
                ":\"Willy Gardiol\""

    # Only S60v5 is supported right now
    dependencyinfo = \
                    "; Default HW/platform dependencies "\
                    "[0x1028315F],0,0,0,{\"S60ProductID\"}"

#    help.sources = c:/progetti/trackaway/trackaway_*.qm

    my_deployment.pkg_prerules += dependencyinfo vendorinfo
    DEPLOYMENT += my_deployment
#help

    TARGET.UID3 = $${TRACKAWAY_UID3}

    TARGET.CAPABILITY += Location NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment $${EXTRA_CAPABILITY}

    TARGET.EPOCSTACKSIZE = 0x14000 # 0x800000 up to 8mb?
    TARGET.EPOCHEAPSIZE = 0x020000 0x4000000 #64mb
#                 0xFFFFFF 16mb

    ICON = trackaway.svg
}

unix:!symbian:!maemo5 {
    target.path = /opt/TrackAWay/bin
    INSTALLS += target
    INSTALLS += target
    CONFIG(debug, debug|release) {
        LIBS += -Lmaemo_libs/debug
    }
    else {
        LIBS += -Lmaemo_libs/release
    }
}

maemo5 {
    target.path = /opt/TrackAWay/bin
    INSTALLS += target
    CONFIG(debug, debug|release) {
        LIBS += -Lmaemo_libs/debug
    }
    else {
        LIBS += -Lmaemo_libs/release
    }
}
